﻿using Abp.Application.Services;
using Abp.Domain.Repositories;
using Batman.Cms.Domains;
using Batman.Cms.Services.Applications.Inputs;

namespace Batman.Cms.Services.Applications
{
    public class ApplicationDataItemManager : ApplicationService
    {
        public IRepository<ApplicationDataItem> repository { get; set; }

        public ApplicationDataItem Create(CreateApplicationDataItemInput model)
        {
            var entity = ObjectMapper.Map<ApplicationDataItem>(model);

            var record = repository.Insert(entity);

            return record;
        }
    }
}
